package cmd

import (
	"cmd-tools/datasync"
	"github.com/spf13/cobra"
)

var dataSyncCmd = &cobra.Command{
	Use:   "datasync",
	Short: "数据同步",
	Long: `
    .___       __                                                
  __| _/____ _/  |______              _________.__. ____   ____  
 / __ |\__  \\   __\__  \    ______  /  ___<   |  |/    \_/ ___\ 
/ /_/ | / __ \|  |  / __ \_ /_____/  \___ \ \___  |   |  \  \___ 
\____ |(____  /__| (____  /         /____  >/ ____|___|  /\___  >
     \/     \/          \/               \/ \/         \/     \/ 
---------------------------> 数据同步 <----------------------------
	`,
	Run: func(cmd *cobra.Command, args []string) {
		datasync.Run()
	},
}

func init() {
	dataSyncCmd.Flags().StringP("config", "f", "", "配置文件地址")
	rootCmd.AddCommand(dataSyncCmd)
}
